import * as antIcons from '@ant-design/icons-vue';
import ant from 'ant-design-vue';
import 'ant-design-vue/dist/antd.css';

import type { App } from 'vue';

export default {
  install(app: App) {
    // 注册全局组件
    Object.keys(antIcons).forEach((key) => {
      app.component(key, antIcons[key as keyof typeof antIcons]);
    });

    app.config.globalProperties.$antIcons = antIcons;
    app.use(ant);
  },
};
